home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 February: Tool Chest / Dev.CD Feb 95 / Dev.CD Feb 95.toast / Sample Code / Newton Sample Code 1.2 / Views / Strange Changes-2 / README.Strange Changes < prev   
Encoding:
Text File  |  1994-03-08  |  1.1 KB  |  26 lines  |  [TEXT/R*ch]

  1. © Copyright 1993-94 Apple Computer, Inc, All Rights Reserved
  2.  
  3. StrangeChanges 1.0 -- by Todd Courtois
  4.  
  5. NTK 1.0
  6.  
  7. This sample code implements a workaround to a current clEditView bug.  The
  8. bug is, if you change the clPolygonView child of a clEditView without
  9. changing the viewBounds of the polygonView, the clEditView's
  10. viewChangedScript will not be called as it should be.
  11.  
  12. The workaround is to slap a viewClickScript onto every child clPolygonView. 
  13. This click script uses a deferred-action "checksum" on the polyugonView's
  14. points slot to determine if the points have changed.  If the points have
  15. changed, it calls the parent clEditView's viewChangedScript.
  16.  
  17. This sample code reveals yet another bug in the clEditView, which is that on
  18. the very first tap in the child clPolygonView, the child's viewClickScript
  19. will not be called even though the child has been clicked on.
  20.  
  21. This is a good example for studying when certain scripts are called in a
  22. clEditView.  It prints to the listener as various scripts are called.  Also
  23. very instructive on how to add your own scripts to the auto-generated
  24. children of a clEditView.
  25.  
  26.